package com.sl.spring.intergration.controller;

import org.springframework.amqp.rabbit.core.RabbitTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class RabbitMQController {

	@Autowired
	private RabbitTemplate rabbitTemplate;
	
	@RequestMapping(value="send")
	public void send(){
		//rabbitTemplate.convertAndSend("spring-boot-exchange", "spring-boot-routingKey", "shuliHa");
		rabbitTemplate.convertAndSend("hello","shuli12344");
	}
}
